home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / gengui2.lha / GenGui2 / Examples / mux.gui < prev    next >
Text File  |  1995-02-08  |  1KB  |  108 lines

  1. projectname Gui1
  2. vbox
  3.    button
  4.       vrel 1
  5.       text "1"
  6.       id 1
  7.    end
  8.    button
  9.       vrel 1
  10.       text "2"
  11.       id 2
  12.    end
  13. end
  14.  
  15. projectname Gui2
  16. hbox
  17.    string
  18.       tags GTST_MaxChars,256
  19.       id 3
  20.    end
  21.    button
  22.       vrel 1
  23.       text "2"
  24.       id 4
  25.    end
  26. end
  27.  
  28. projectname Gui3
  29. vbox
  30.    hbox
  31.       button
  32.          vrel 1
  33.          text "1"
  34.          id 5
  35.       end
  36.       button
  37.          vrel 1
  38.          text "2"
  39.          id 6
  40.       end
  41.    end
  42.    hbox
  43.       button
  44.          vrel 1
  45.          text "3"
  46.          id 7
  47.       end
  48.       button
  49.          vrel 1
  50.          text "4"
  51.          id 8
  52.       end
  53.    end
  54. end
  55.  
  56. #c_source
  57.  
  58. char *modes[]={"Mode 1","Mode 2","Mode 3",NULL};
  59. struct WinInfo *muxmodes[]={&Gui1,&Gui2,&Gui3};
  60.  
  61. int gui_mux=0;
  62.  
  63. extern struct WinInfo TestPro;
  64.  
  65. int MHook(struct IntuiMessage *msg)
  66. {
  67.    GG_StopGui(&TestPro);
  68.  
  69.    gui_mux=msg->Code;
  70.  
  71.    GG_ClearWindow(TestPro.Window);
  72.  
  73.    GG_RenderGui(TestPro.Window,&TestPro);
  74.    return(1);
  75. }
  76.  
  77. int Multiplex(struct WinInfo *winfo,
  78.                      struct NewGadget *ng,
  79.                      struct GadInfo *gad,
  80.                      int left, int top, int width, int height)
  81. {
  82.    return(GG_SubGui(winfo,muxmodes[gui_mux],left,top,width,height));
  83. }
  84.  
  85. #end_source
  86.  
  87. projectname TestPro
  88. vbox
  89.    cycle
  90.       tags GTCY_Labels,(ULONG)modes
  91.       id 10
  92.       hook MHook
  93.    end
  94.    custom
  95.       MinHChar 4
  96.       MinVChar 2
  97.       MinVPix  2*4+INTERHEIGHT
  98.       custom Multiplex
  99.       id 11
  100.    end
  101. end
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.